<template>
  <u-tabbar :fixed="true" :placeholder="true" activeColor="#d81e06" :safeAreaInsetBottom="true">

    <u-tabbar-item text="首页" icon="home" @click="goTarget(1)"></u-tabbar-item>
    <u-tabbar-item text="消息" icon="chat" @click="goTarget(2)"></u-tabbar-item>
    <u-tabbar-item text="我的" icon="account" @click="goTarget(3)"></u-tabbar-item>
  </u-tabbar>
</template>

<script setup>
  const goTarget = (type) => {
    switch (type) {
      case 1:
        uni.switchTab({
          url:'/pages/shouye/shouye'
        })
        break;
      case 2:
      uni.switchTab({
        url:'/pages/xiaoxi/xiaoxi'
      })
        break;
      case 3:
      uni.switchTab({
        url:'/pages/wode/wode'
      })
        break;
      default:
        break;
    }
  }
</script>

<style lang="scss">

</style>